package com.qs.user.api;


import com.qs.base.data.BaseData;
import com.qs.user.entity.BaseResult;
import com.qs.user.entity.LoginEntity;
import com.qs.user.entity.MemberPriceEntity;
import com.qs.user.entity.PayEntity;

import java.util.Map;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

public interface ApiService {

    public String modelName = "/user";
    //登录ip
    String LoginIP = "http://api.dreamyin.cn:1011/";

    // 发送手机验证码
    @POST()
    Observable<LoginEntity> code( @Query("appName") String appName ,@Query("TELMobile") String mobile ,@Query("sign")String sign);


    //登录
    @POST(LoginIP + "UserCreate/Create.aspx")
    Observable<LoginEntity> register(@Query("APP_Name") String appName, @Body RequestBody body);

    // 手机号码登录
    @POST("http://user.dreamyin.cn/UserLogin/rutrnUserInfo.aspx?APP_Name="+ BaseData.APPNAME)
    Observable<LoginEntity> phoneLogin(@Body RequestBody body);

    //剩余翻译次数
    @GET("/scanning/GetNumbersByUserid")
    Observable<Map<String, Object>> getNumbersByUserid(@QueryMap Map<String, Object> map);

    //添加翻译次数
    @POST("/scanning/AddNumbers")
    Observable<Map<String, Object>> addNumbers(@Body RequestBody body);

    //会员价格
    @GET("/WaterMark/GetVIPPrice")
    Observable<BaseResult<MemberPriceEntity>> getVIPPrice(@QueryMap Map<String, Object> map);

    //会员天数
    @GET("/User/GetVIPInfo")
    Observable<Map<String, Object>> getVIPInfo(@QueryMap Map<String, Object> map);

    //发送微信数据
    @POST("payWeChet/VipPayCreateOrder")
    Observable<PayEntity> vipPayCreateOrder(@Body RequestBody body);

    //发送支付宝数据
    @POST("/payAliPay/VipCreateOrder")
    Observable<PayEntity> vipCreateOrder(@Body RequestBody body);

}
